$(function(){
		YuXi.InfoQuery.init({	
		url:"getAlreadyDoInfoFlow.do",
		query:{
				flowId:5,
				currentPage:1
			},					
		success:function(data){					
				YuXi.Render.InformationSeach(data.list,4,"已研判");//调用信息查询的页面渲染模块
			},
			getQueryParm:function(){
						var query={};
						query={
							flowId:5,
							currentPage:1
						}
						YuXi.InfoQuery.queryData=YuXi.ALLSearch.base(query);
					},
				error:function(){},
				/* selector:{
					nextPage:$("#nextPage"),
					prevPage:$("#prevPage"),
					firstPage:$("#headPage"),
					lastPage:$("#endPage"),
					totalPage:$("#totalPage")
					此项为默认项
				}	 */
		});		
	 $("#tablebody").parent().on("click", ".detail", function() {
			var id= $(this).attr("data-id");
			
			window.location.href='/yuxi/model/information/subDetailInfo.jsp?detailId='+id;
			/* location.search = "?detailId="+id;*/
	})
	 $("#ExcelFrist").click(function(){
	 	  $(".export-form").attr("action","/yuxi/LoginFilter/imporExcelForAnalysis.do").submit();
	 })
	$("#Excelsec").click(function(){
		
		if($("input[name='idArray']:checked").length>=1)
		{
			$("#infoJudge").modal('show');
		}	
		else
		{
			myTool.alert({		
			title:"提示",
			context:"必须勾选信息才能导出",
			isMask:true,
			callback:function(){
				
			}
		});
		}

	});
//导出会议记录表
	$("#exportWord").click(function(){
	
		var falg=0;
		var people="";
		var time=$("#conferenceTime").val();
		var address=$("#address").val();
		
		//责任人id和名字
		var user=$(".select-data-user");
		if(user.length>0){
			for(var i=0;i<user.length;i++){
				if(i==user.length-1){
					people+=user.eq(i).html();
				}
				else{
					people=people+user.eq(i).html()+",";
				}
			}
		}
		
		if(time=="" || time=="请选择会议时间"){
			myTool.alert({		
			title:"提示",
			context:"提交失败,请选择会议时间！",
			isMask:true,
			callback:function(){
				}
			});
	    	
	    	return false;
	    }
		if(address=="" || address=="请输入会议地点"){
			myTool.alert({		
			title:"提示",
			context:"提交失败,请录入会议地点！",
			isMask:true,
			callback:function(){
				}
			});
	  
	    	return false;
	    }
		if(people==""){
			myTool.alert({		
			title:"提示",
			context:"提交失败,请选择参会人员！",
			isMask:true,
			callback:function(){
				}
			});
	  
	    	
	    	return false;
	    }	
	
		$("#people").val(people);

	  $(".export-form").attr("action","/yuxi/LoginFilter/ExportTaskReseachWord.do").submit();//---------------------------------------导出会议记录
  	
		/*document.getElementById("sub").click();
		document.getElementById("sureOut").click();*/
	});

	 
	
		
		 $(".export-form").submit(function(){
		var check=$("input[name='idArray']:checked");
		if(check.length<=0){
			myTool.alert({
				title:"提示",
				context:"请勾选导出信息",
				isMask:true
			});		
			return false;
		}
		
		if(check==null){
			myTool.alert({
				title:"提示",
				context:"请勾选导出信息",
				isMask:true
			});		
			return false;
		}
		return true;
  });
		
		
		
		function modal(title,text){
			myTool.alert({		
				title:title,
				context:text,
				isMask:true,
				callback:function(){}
			});
		}



});